﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx.Helpers;
using System.IO;
using Styx;
using Styx.Common;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.TreeSharp;

namespace Guardian
{
    public class SettingsCat : Settings
    {
        public static readonly SettingsCat myPrefs = new SettingsCat();

        public SettingsCat()
            : base(
                Path.Combine(Utilities.AssemblyDirectory,
                    string.Format(@"Routines/Settings/{0}/Druid/SettingsCat-{1}.xml", StyxWoW.Me.RealmName, StyxWoW.Me.Name))
                )
        {
        }

        [Setting]
        [DefaultValue(3)]
        [Category("Setings")]
        [DisplayName("AOE @ adds")]
        [Description("Start AOE if adds >= this Value")]
        public int startCatAoe { get; set; }

        [Setting]
        [DefaultValue(7)]
        [Category("Settings")]
        [DisplayName("Bear AOE @ adds")]
        [Description("Start AOE in Bear Form if adds >= this Value")]
        public int startBearAoe { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings")]
        [DisplayName("Heal others")]
        [Description("Heal others with Predatory Swiftness procs")]
        public bool HealOthers { get; set; }

        [Setting]
        [DefaultValue(90)]
        [Category("Settings")]
        [DisplayName("Heal others HP %")]
        [Description("Heal others with Predatory Swiftness procs if my Health % >= this value")]
        public int PercentHealOthers { get; set; }

        //protection
        [Setting]
        [DefaultValue(55)]
        [Category("Protection")]
        [DisplayName("Healthstone HP %")]
        [Description("Use Healthstone below HP %")]
        public int PercentHealthstone { get; set; }

        [Setting]
        [DefaultValue(75)]
        [Category("Protection")]
        [DisplayName("Barkskin HP %")]
        [Description("Use Barkskin below HP %")]
        public int PercentBarkskin { get; set; }

        [Setting]
        [DefaultValue(25)]
        [Category("Protection")]
        [DisplayName("Survival Instincts HP %")]
        [Description("Use Survival Instincts below HP %")]
        public int PercentSurvivalInstincts { get; set; }

        [Setting]
        [DefaultValue(45)]
        [Category("Protection")]
        [DisplayName("Frenzied Regeneration HP %")]
        [Description("Use Frenzied Regeneration below HP %")]
        public int PercentFrenziedRegeneration { get; set; }

        //symbiosis

        [Setting]
        [DefaultValue(false)]
        [Category("Symbiosis")]
        [DisplayName("Auto cast Symbiosis")]
        [Description("Auto Cast Symbiosis on DK, Monk or Pala")]
        public bool AutoSymbiosis { get; set; }

        [Setting]
        [DefaultValue(30)]
        [Category("Symbiosis")]
        [DisplayName("Elusive Brew HP %")]
        [Description("Use Elusive Brew below HP %")]
        public int PercentElusiveBrew { get; set; }

        //Rebirth
        [Setting]
        [DefaultValue(false)]
        [Category("Rebirth")]
        [DisplayName("Auto Res Tank")]
        [Description("Auto Res Tank with Rebirth Proc")]
        public bool AutoResTank { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Rebirth")]
        [DisplayName("Auto Res Healer")]
        [Description("Auto Res Healer with Rebirth Proc")]
        public bool AutoResHealer { get; set; }

        //resting
        [Setting]
        [DefaultValue(85)]
        [Category("Resting")]
        [DisplayName("Rejuvenation HP %")]
        [Description("Use Rejuvenation below HP % Out of Combat")]
        public int PercentRejuvenation { get; set; }

        [Setting]
        [DefaultValue(70)]
        [Category("Resting")]
        [DisplayName("Healing HP %")]
        [Description("Use Healing Touch below HP % Out of Combat")]
        public int PercentHealingTouch { get; set; }

        [Setting]
        [DefaultValue(45)]
        [Category("Resting")]
        [DisplayName("Eat Food HP %")]
        [Description("Eat Food below HP % Out of Combat")]
        public int PercentEatFood { get; set; }


        // trinkets section
        public enum TrinketsUse
        {
            Manual,
            Below_HealthPercent,
            CrowdControlled,
            DPS_Boost

        }

        [Setting]
        [DefaultValue(TrinketsUse.Manual)]
        [Category("Trinket 1")]
        [DisplayName("Trinket 1")]
        [Description("When to use trinket 1")]
        public TrinketsUse Trinket1Use { get; set; }

        [Setting]
        [DefaultValue(65)]
        [Category("Trinket 1")]
        [DisplayName("Trinket 1 HP %")]
        [Description("Use trinket 1 below HP %")]
        public int trinket1hppercent { get; set; }

        [Setting]
        [DefaultValue(TrinketsUse.Manual)]
        [Category("Trinket 2")]
        [DisplayName("Trinket 2")]
        [Description("When to use trinket 2")]
        public TrinketsUse Trinket2Use { get; set; }

        [Setting]
        [DefaultValue(65)]
        [Category("Trinket 2")]
        [DisplayName("Trinket 2 HP %")]
        [Description("Use trinket 2 below HP %")]
        public int trinket2hppercent { get; set; }

        //glyphs
        [Setting]
        [DefaultValue(false)]
        [Category("Glyphs")]
        [DisplayName("Glyph of Savagery")]
        [Description("Have Glyph of Savagery")]
        public bool HaveGlyphOfSavagery { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Glyphs")]
        [DisplayName("Glyph of Shred")]
        [Description("Have Glyph of Shred")]
        public bool HaveGlyphOfShred { get; set; }
    }
}
